package cn.ex.ymcc.feign;

import cn.ex.ymcc.domain.CourseUserLearn;
import cn.ex.ymcc.feign.fallback.CourseUserLearnFeignClientFallbackFactory;
import cn.ex.ymcc.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(value = "service-course",fallbackFactory = CourseUserLearnFeignClientFallbackFactory.class)
public interface CourseUserLearnFeignClient {

    /**
     * 查询用户的课程订单
     * @param courseIds
     * @return
     */
    @RequestMapping(value="/course/info/{courseIds}",method= RequestMethod.GET)
    JSONResult courseOrderInfo(@PathVariable("courseIds") String courseIds);

    @RequestMapping(value="/course/mediaInfo/{courseId}",method= RequestMethod.GET)
    JSONResult selectForUser(@PathVariable Long courseId);
}
